There are numerous industrial processes that produce gas streams containing carbon dioxide, hydrogen sulfide, and hydrogen chloride, or gas streams containing carbon dioxide, nitrogen oxides, and sulfur oxides. It is often desirable to remove one or more of these gases from the other components of the gas streams, such as hydrogen and nitrogen. Selectively permeable polymeric membranes have been investigated for a variety of gas separation applications, including hydrogen purification and carbon dioxide sequestration. However, existing selectively permeable polymeric membranes are readily oxidized when contacted with air (e.g., such as a sweep gas) at elevated temperatures. As a consequence, existing membranes are unsuitable for many applications. Thus, there remains a need in the art for membranes, methods of making membranes, and methods of separating gases.